feat: add support for URI activations for coder scheme#72
Merged
Conversation
deansheather
approved these changes
Apr 22, 2025
Comment on lines
+38
to
+45
| // Register for URI handling (known as "protocol activation") | ||
| #if DEBUG | ||
| const string scheme = "coder-debug"; | ||
| #else | ||
| const string scheme = "coder"; | ||
| #endif | ||
| var thisBin = Assembly.GetExecutingAssembly().Location; | ||
| ActivationRegistrationManager.RegisterForProtocolActivation(scheme, thisBin + ",1", "Coder Desktop", ""); |
Member
There was a problem hiding this comment.
Is it typical for apps to register themselves? Or is it more common for it to be registered in the installer (not sure if this is even an option)?
Collaborator
Author
There was a problem hiding this comment.
The installer could do it, but I'm not sure it provides any advantage.
One advantage of the App registering itself is that you don't need to install to debug, which is nice.
We might want to cosider unregistering in the uninstaller, which I can look into in another PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

relates to #52
Adds support for Coder Desktop to handle the
coder:/URI scheme by registering for this scheme and forwarding activations to the single instance of Coder Desktop.Also removes the
Package.appxmanifest. It is unused since Coder Desktop is not a packaged app.